package cn.lg.soar.core.config;

import cn.lg.soar.core.manager.IStateAccessTokenManager;
import cn.lg.soar.core.manager.LocalStateAccessTokenManager;
import cn.lg.soar.core.model.AccessTokenProps;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;

/**
 * @author luguoxiang
 * @date 2022/8/18
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Configuration
public class TokenConfig {

    @Autowired
    private AccessTokenProps accessTokenProps;

    @Lazy
    @Bean
    public IStateAccessTokenManager localStateAccessTokenManager() {
        return new LocalStateAccessTokenManager(accessTokenProps);
    }

}
